{%extends '../base/base.tpl'%}

{%block 'title'%}运营管理-红包{%/block%}

{%block 'header_css'%}
<link href="../../static/js/common/plugins/chosen/chosen.css?__inline" rel="stylesheet">
    <link href="../../static/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<link href="../../static/css/style.min.css?__inline" rel="stylesheet">
<link href="../../static/css/common.css?__inline" rel="stylesheet">
	<style type="text/css">
		table{font-size:13px;text-align:center;}
		thead{font-weight:bold;text-align:center;}
		th{text-align: center;}
		.list_edit_table{}
    .is_must{line-height: 34px;}
    table a{display: inline-block;}
	</style>
{%/block%}

{%block 'header_js'%}	

{%/block%}

{%block 'foot'%}

{%/block%}

{%block 'body'%}
{%assign var=table_operation value="true" %}
{%assign var=data_spare_name value="coupon_id" %}
{%assign var=table_btn value=array(
  [
    'url'=>'#',
    'text'=>'编辑',
    'type'=>'edit_btn',
    'data_spare'=>$data_spare_name,
    'data_target'=>'#table_detail',
    'data_toggle'=>'modal'
  ],
  [
    'url'=>'#',
    'text'=>'详情',
    'type'=>'detail_btn',
    'data_spare'=>$data_spare_name,
    'data_target'=>'#table_detail',
    'data_toggle'=>'modal'
  ],
  [
    'url'=>'#',
    'text'=>'删除',
    'type'=>'del_btn',
    'data_spare'=>$data_spare_name,
    'data_target'=>'null',
    'data_toggle'=>'null'
  ]
) %}
  	<div id="wrapper">
  		{%include file="../../widget/left_menu.tpl"%}
		<div id="page-wrapper" class="gray-bg dashbard-1">
		{%include file="../../widget/header.tpl"%}
		<div class="row J_mainContent" id="content-main">
			
            <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h3>红包管理</h3>
                    </div>
                    <div class="ibox-content">
                    	<a type="button" href="#" class="btn btn-primary new_file_coupon" data-toggle="modal" data-target="#table_detail">创建优惠券</a>
                      
                          {%include file="../../widget/table_mod.tpl"%}
                          {%include file="../../widget/pagination.tpl"%}
                      
                    </div>
                </div>
        </div>
  		{%include file="../../widget/footer.tpl"%}
  		</div>
  	</div>
   {%include file="../../widget/editable_mod.tpl"%}
{%/block%}
 	
{%block 'foot_js'%}
<script src="../../static/js/common/plugins/chosen/chosen.jquery.js?__inline"></script>
<script src="../../static/js/common/content.min.js"></script>
<script src="../../static/js/common/plugins/validate/jquery.validate.min.js"></script>
<script src="../../static/js/common/plugins/validate/messages_zh.min.js"></script>
<script src="../../static/js/common/jquery.form.js"></script>
<script src="../../static/js/common/plugins/sweetalert/sweetalert.min.js"></script>

<script src="../../static/js/common/plugins/jeditable/jquery.jeditable.js"></script>
<script src="../../static/js/common/plugins/dataTables/jquery.dataTables.js"></script>
<script src="../../static/js/common/plugins/dataTables/dataTables.bootstrap.js"></script>
<!-- 富文本 -->
<script type="text/javascript" charset="utf-8" src="../../static/js/common/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../../static/js/common/plugins/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="../../static/js/common/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
<!-- <script src="../../static/js/table/tableoperation.js"></script> -->
<script src="../../static/js/table/tableModel.js"></script>
<script type="text/javascript">
 	
var customFun = {
        complete:function(){
          couponType();
          $("#coupon_type").change(function(){
            couponType();
          })
          
        }

      };
common_option = customFun;

function couponType(){
  if($("#coupon_type").val() == 0){
     $("#discount").attr("readonly","readonly").val("");
     $("#discount_money_max").attr("readonly","readonly").val("");
     $("#base_money").removeAttr("readonly");
     $("#money").removeAttr("readonly");
  }else{
     $("#discount").removeAttr("readonly");
     $("#discount_money_max").removeAttr("readonly");
     $("#base_money").attr("readonly","readonly").val("");
     $("#money").attr("readonly","readonly").val("");
  }
}
 

  
    
  

  

  
 	
 	
  


 

</script> 
{%/block%}
